//
//  HDInsuranceTableViewCell.swift
//  HuaDaoPeifu
//
//  Created by 刘汉琳 on 16/4/11.
//  Copyright © 2016年 paiyipai. All rights reserved.
//

import UIKit

class HDInsuranceTableViewCell: UITableViewCell {
    
    var messageLabel:UILabel?

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    init(dataStr:String, reuseIdentifier cellId:String,index:IndexPath) {
        super.init(style: UITableViewCellStyle.default, reuseIdentifier: cellId)
        setupCell()
    }
    
    func setupCell(){
        setupLayOut()
        messageLabel?.text = "平安车险报价涵盖车损险／盗抢险／不计免赔等多项可靠保障，真正业界良心，报价仅需1分钟平安车险异地出险全国通赔，更有7*24小时免费道路救援，更多贴心服务点此了解详情"
        
    }
    
    func setupLayOut(){
        
        messageLabel = UILabel()
        self.contentView.addSubview(messageLabel!)
        messageLabel?.snp.makeConstraints({ (make) in
            make.top.equalTo(10)
            make.left.equalTo(15)
            make.width.equalTo(AppConstant.screenWidth - 30)
            make.height.equalTo(95)
        })
        messageLabel?.textColor = UIColor(hex:0x555555)
        messageLabel?.textAlignment = .left
        messageLabel?.font = UIFont.systemFont(ofSize: 14)
        messageLabel?.numberOfLines = 0

    }
    
}
